home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Macintosh Bible Guide to Games
/
GameGuideCd.bin
/
Cheaters
/
Marathon Stuff
/
Mara. OPE 1.3
/
FileFormats
/
How OPE works
next >
Wrap
Text File
|
1995-03-15
|
7KB
|
182 lines
=====================================================================
How Object Placement Editor (previously NetEdit) Works
By Eric Bennett (ericb@psu.edu, Marathon@emb121.rh.psu.edu)
With assistance from Tom Klancer (tklancer@cnj.digex.net)
=====================================================================
The Object Placement Editor (OPE) looks for the string "plac" in the map file which
indicates the beginning of the object placement file. It then backs up about 70 bytes
to get the name of the level. From "plac" it then goes forward 24 bytes (start of
objects) and 792 bytes (start of characters) to find the placement information which it
edits. The placement record for each character/object is 12 bytes, as follows:
Bytes Value Significance
-------------------------------------
1-2 000x x=random placement flag. If x=1, then objects are placed
randomly on the level. If x=0, objects are placed in
predefined spots (I don't know where the predefined spots
are stored). In net levels, x=1; in regual levels, x is
usually zero.
3-4 00xx xx=initial number of the object on level
5-6 00xx xx=Min # object on level
Objects are replenished so that the total number present
is greater than or equal to the value in bytes 7-8.
7-8 00xx xx=total # of object on level. The total number of this
object will not exceed this value. Once the Min# is
achieved, Marathon _slowly_ adds more until Max# is reached.
9-10 xxxx xxxx=total # of additions allowed during course of game in
addition to the minimum number which must always be there.
An example explains this better: suppose Min# fighters is 2,
Max# is 4, Extras is 10. There will always be at least 2
fighters; fighters will be added until up till four are
present, but only ten times--after this only the two required
fighters will be present. Or you can think of the Min# field
as having precedence over the Extras field. 65535 supposedly
represents infinite replenishment (as if anyone would play
long enough to exhaust 65534 items...).
11-12 xxxx xxxx=replenishment frequency. The higher the value of these
bytes, the more often Marathon adds the object in an attempt
to reach the Max#.
The objects start at +24 from "plac":
Offset Record
from contents
"plac"
24 Pistol
36 Pistol Ammo
48 Fusion Pistol
60 Fusion Battery
72 AR-75
84 AR-75 bullet clip
96 AR-75 grenades
108 SPNKR
120 Missiles
132 Invisibility
144 Invulnerability
156 Night Vision
168 Alien Weapon
180 Alien Ammo Clip
192 TOZT
204 Napalm Canister
216 Wide-angle view
228 Defense Center Chip
240 Alien Energy Converter
Technically I think the fist is at offset 12, but no graphic appears on the level for it
(although you _will_ occassionally here a "plunk" as you pick up an invisible fist,
which in any case does not appear under your weapons list). Going beyond 240 also
causes you to pick up invisible objects, whereas using undefined characters (see below)
causes Marathon to crash.
Here are the offsets for the various characters:
Offset Record
from contents
"plac"
792 Assimilated Civilian ("Exploding Bob")
804 Minor Fighter
816 Major Fighter
828 Minor Bolt Fighter
840 Major Bolt Fighter
852 Green civilian
864 Yellow civilian
876 Blue civilian
888 Orange Civilian
900 Unused
912 Unused
924 Minor Enforcer
936 Major Enforcer
948 Minor Compiler/S'pht
960 Major Compiler
972 Minor Invisible Compiler
984 Major Invisible Compiler
996 Minor Hulk
1008 Major Hulk
1020 Minor Hunter
1032 Major Hunter
1044 Minor Juggernaut
1056 Major Juggernaut
1068 Minor Looker ("Explodabug")
1080 Major Looker
1092 Invisible Looker
1104 Marathon Defense Drone
1116 Unused
1128 Unused
1130 Minor Trooper
1152 Major Trooper
1164 Minor Wasp
1176 Major Wasp
1188 Unused
1200 Unused
1212 Unused
1224 Unused
1236 Alien Leader
1248 Renegade Defense Drone
=====================================================================
Changing OPE to recognize new objects or aliens
=====================================================================
If someone figures out how to add new objects or aliens to Marathon
and you want OPE to recognize them, you can do so by modifying
the STR# resources in OPE with Resorcerer or ResEdit.
STR# 130 -- contains character names. Just add entries (the first
one you add will have offset 1260, the second will be
1272, etc.). A blank entry should terminate the list.
NetEdit has an internal limit of 48 of these records
(records beyond this are simply ignored).
STR# 131 -- contains character comments. Just be sure that there are
at least as many strings in this resource as in 130.
STR# 140 -- contains object names. Just add entries (the first
one you add will have offset 252, the second will be
264, etc.). A blank entry should terminate the list.
NetEdit has an internal limit of 28 of these records
(records beyond this are simply ignored).
STR# 141 -- contains object comments. Just be sure that there are
at least as many strings in this resource as in 140.
=====================================================================
Changing the Randomizer
=====================================================================
Open the OPE application in ResEdit and open the STR# resources.
In resources STR# 132 and 142, OPE stores what type of object each
entry is (for use by the Randomizer), according to the following
scheme:
_typInvalid=0 the Randomizer will never place these
_typWeapon=1 weapon
_typAmmo=2 ammo
_typGoodie=3 night vision, invisibility etc.
_typMisc=4 defense center repair chips etc. (Randomizer
ignores them)
_typSmallAlien=5 small alien; placed randomly
_typBigAlien=6 big alien (juggernaut, hulk) placed only in
specific locations
_typNeutral=8 the Bobs.
_typFriend=9 defense drones.
The amount of Bobs on a level is influenced partly by what you
choose for "friends & goodies" in the randomizer window, but
mostly by what you choose for aliens (since the Bobs get in the
way I see them as an opponent just like any other alien).
You might want to change the Bobs to "friends" or change the hulks
to "small" aliens so that they will be placed randomly. To change
the hulks, look in STR# 130; you'll see that the hulks are strings
18 and 19. Go to STR# 132 strings 18 and 19, which are the hulk
types (6=big alien, by default). Change these strings to 5 and
hulks will appear randomly.
[end of file]